<cfparam name="attributes.actiontype" default="">
<cfparam name="attributes.type" default="">
<cfparam name="attributes.product" default="">
<cfparam name="attributes.line" default="">
<cfparam name="attributes.user" default="">
<cfparam name="attributes.expire_date" default="">
<cfparam name="attributes.text" default="">
<cfparam name="attributes.version" default="">

<cfif attributes.actiontype is "Delete">
	<cfscript>
		xml = 
		'<!DOCTYPE copy SYSTEM "#attributes.dtd#">
		<xtiinput>
		   <inputheader>
		      <actionset>
		         <action>del_product_notes</action>
		      </actionset>
		   </inputheader>
		   <inputdata>
		   	  <note>
			      <type>#attributes.type#</type>
			      <product>#ucase(attributes.product)#</product>
			      <line>#attributes.line#</line>
			      <user>#ucase(attributes.user)#</user>
			      <expire_date>#attributes.expire_date#</expire_date>
			      <text>#attributes.text#</text>
			  </note>
		   </inputdata>
		 </xtiinput>';
	</cfscript>
<cfelseif attributes.actiontype is "Insert">
	<cfscript>
		xml = 
		'<!DOCTYPE copy SYSTEM "#attributes.dtd#">
		<xtiinput>
		   <inputheader>
		      <actionset>
		         <action>add_product_notes</action>
		      </actionset>
		   </inputheader>
		   <inputdata>
		   	  <note>
			      <type>#attributes.type#</type>
			      <product>#ucase(attributes.product)#</product>
			      <user>#ucase(attributes.user)#</user>
			      <expire_date>#attributes.expire_date#</expire_date>
			      <version>#attributes.version#</version>
			      <text>#attributes.text#</text>
			  </note>
		   </inputdata>
		 </xtiinput>';
	</cfscript>
<cfelseif attributes.actiontype is "Update">
	<cfscript>
		xml = 
		'<!DOCTYPE copy SYSTEM "#attributes.dtd#">
		<xtiinput>
		   <inputheader>
		      <actionset>
		         <action>chg_product_notes</action>
		      </actionset>
		   </inputheader>
		   <inputdata>
		   	  <note>
			      <type>#attributes.type#</type>
			      <product>#ucase(attributes.product)#</product>
			      <line>#attributes.line#</line>
			      <user>#ucase(attributes.user)#</user>
			      <expire_date>#attributes.expire_date#</expire_date>
			      <text>#attributes.text#</text>
			  </note>
		   </inputdata>
		 </xtiinput>';
	</cfscript>
<cfelseif attributes.actiontype is "Get">
	<cfscript>
		xml = 
		'<!DOCTYPE copy SYSTEM "#attributes.dtd#">
		<xtiinput>
		   <inputheader>
		      <actionset>
		         <action>get_product_notes</action>
		      </actionset>
		   </inputheader>
		   <inputdata>
				<note>
					<type>#attributes.type#</type>
					<product>#ucase(attributes.product)#</product>
				</note>
		   </inputdata>
		 </xtiinput>';
	</cfscript>
</cfif>